home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / Universal Headers 2.0.1f / Video.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-22  |  23.4 KB  |  612 lines  |  [TEXT/MMCC]

  1. /*
  2.      File:        Video.h
  3.  
  4.      Contains:    Video Driver Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __VIDEO__
  21. #define __VIDEO__
  22.  
  23.  
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. /*    #include <Types.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <MixedMode.h>                                        */
  30. /*    #include <QuickdrawText.h>                                    */
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. #if PRAGMA_ALIGN_SUPPORTED
  37. #pragma options align=mac68k
  38. #endif
  39.  
  40. #if PRAGMA_IMPORT_SUPPORTED
  41. #pragma import on
  42. #endif
  43.  
  44.  
  45. enum {
  46.     mBaseOffset                    = 1,                            /*Id of mBaseOffset.*/
  47.     mRowBytes                    = 2,                            /*Video sResource parameter Id's */
  48.     mBounds                        = 3,                            /*Video sResource parameter Id's */
  49.     mVersion                    = 4,                            /*Video sResource parameter Id's */
  50.     mHRes                        = 5,                            /*Video sResource parameter Id's */
  51.     mVRes                        = 6,                            /*Video sResource parameter Id's */
  52.     mPixelType                    = 7,                            /*Video sResource parameter Id's */
  53.     mPixelSize                    = 8,                            /*Video sResource parameter Id's */
  54.     mCmpCount                    = 9,                            /*Video sResource parameter Id's */
  55.     mCmpSize                    = 10,                            /*Video sResource parameter Id's */
  56.     mPlaneBytes                    = 11,                            /*Video sResource parameter Id's */
  57.     mVertRefRate                = 14,                            /*Video sResource parameter Id's */
  58.     mVidParams                    = 1,                            /*Video parameter block id.*/
  59.     mTable                        = 2,                            /*Offset to the table.*/
  60.     mPageCnt                    = 3,                            /*Number of pages*/
  61.     mDevType                    = 4,                            /*Device Type*/
  62.     oneBitMode                    = 128,                            /*Id of OneBitMode Parameter list.*/
  63.     twoBitMode                    = 129,                            /*Id of TwoBitMode Parameter list.*/
  64.     fourBitMode                    = 130,                            /*Id of FourBitMode Parameter list.*/
  65.     eightBitMode                = 131                            /*Id of EightBitMode Parameter list.*/
  66. };
  67.  
  68. enum {
  69.     sixteenBitMode                = 132,                            /*Id of SixteenBitMode Parameter list.*/
  70.     thirtyTwoBitMode            = 133,                            /*Id of ThirtyTwoBitMode Parameter list.*/
  71.     firstVidMode                = 128,                            /*The new, better way to do the above. */
  72.     secondVidMode                = 129,                            /* QuickDraw only supports six video */
  73.     thirdVidMode                = 130,                            /* at this time.      */
  74.     fourthVidMode                = 131,
  75.     fifthVidMode                = 132,
  76.     sixthVidMode                = 133,
  77.     spGammaDir                    = 64,
  78.     spVidNamesDir                = 65
  79. };
  80.  
  81. /* csTimingFormat values in VDTimingInfo */
  82. /* look in the declaration rom for timing info */
  83. enum {
  84.     kDeclROMtables                = 'decl'
  85. };
  86.  
  87. /* Timing mode constants for Display Manager MultiMode support
  88.     Corresponding    .h equates are in Video.h
  89.                     .a equates are in Video.a
  90.                     .r equates are in DepVideoEqu.r
  91. */
  92. enum {
  93.     timingInvalid                = 0,                            /* Unknown timing… force user to confirm.*/
  94.     timingApple12                = 130,                            /*  512x384 (60 Hz) Rubik timing.*/
  95.     timingApple12x                = 135,                            /*  560x384 (60 Hz) Rubik-560 timing.*/
  96.     timingApple13                = 140,                            /*  640x480 (67 Hz) HR timing.*/
  97.     timingApple13x                = 145,                            /*  640x400 (67 Hz) HR-400 timing.*/
  98.     timingAppleVGA                = 150,                            /*  640x480 (60 Hz) VGA timing.*/
  99.     timingApple15                = 160,                            /*  640x870 (75 Hz) FPD timing.*/
  100.     timingApple15x                = 165,                            /*  640x818 (75 Hz) FPD-818 timing.*/
  101.     timingApple16                = 170,                            /*  832x624 (75 Hz) GoldFish timing.*/
  102.     timingAppleSVGA                = 180,                            /*  800x600 (56 Hz) SVGA timing.*/
  103.     timingApple1Ka                = 190,                            /* 1024x768 (60 Hz) VESA 1K-60Hz timing.*/
  104.     timingApple1Kb                = 200,                            /* 1024x768 (70 Hz) VESA 1K-70Hz timing.*/
  105.     timingApple19                = 210,                            /* 1024x768 (75 Hz) Apple 19" RGB.*/
  106.     timingApple21                = 220,                            /* 1152x870 (75 Hz) Apple 21" RGB.*/
  107.     timingAppleNTSC_ST            = 230,                            /*  512x384 (60 Hz, interlaced, non-convolved).*/
  108.     timingAppleNTSC_FF            = 232,                            /*  640x480 (60 Hz, interlaced, non-convolved).*/
  109.     timingAppleNTSC_STconv        = 234,                            /*  512x384 (60 Hz, interlaced, convolved).*/
  110.     timingAppleNTSC_FFconv        = 236,                            /*  640x480 (60 Hz, interlaced, convolved).*/
  111.     timingApplePAL_ST            = 238,                            /*  640x480 (50 Hz, interlaced, non-convolved).*/
  112.     timingApplePAL_FF            = 240,                            /*  768x576 (50 Hz, interlaced, non-convolved).*/
  113.     timingApplePAL_STconv        = 242,                            /*  640x480 (50 Hz, interlaced, non-convolved).*/
  114.     timingApplePAL_FFconv        = 244                            /*  768x576 (50 Hz, interlaced, non-convolved).*/
  115. };
  116.  
  117. /* csConnectFlags values in VDDisplayConnectInfo */
  118. enum {
  119.     kAllModesValid                = 0,                            /* All modes not trimmed by primary init are good close enough to try */
  120.     kAllModesSafe                = 1,                            /* All modes not trimmed by primary init are know to be safe */
  121.     kReportsTagging                = 2,                            /* Can detect tagged displays (to identify smart monitors) */
  122.     kHasDirectConnection        = 3,                            /* True implies that driver can talk directly to device (e.g. serial data link via sense lines) */
  123.     kIsMonoDev                    = 4,                            /* Says whether there’s an RGB (0) or Monochrome (1) connection. */
  124.     kUncertainConnection        = 5,                            /* There may not be a display (no sense lines?). */
  125.     kTaggingInfoNonStandard        = 6,                            /* Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). */
  126.     kReportsDDCConnection        = 7,                            /* Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). */
  127.     kHasDDCConnection            = 8                                /* Card has ddc connect now. */
  128. };
  129.  
  130. /* csDisplayType values in VDDisplayConnectInfo */
  131. enum {
  132.     kUnknownConnect                = 1,                            /* Not sure how we’ll use this, but seems like a good idea. */
  133.     kPanelConnect                = 2,                            /* For use with fixed-in-place LCD panels. */
  134.     kPanelTFTConnect            = 2,                            /* Alias for kPanelConnect */
  135.     kFixedModeCRTConnect        = 3,                            /*  For use with fixed-mode (i.e., very limited range) displays. */
  136.     kMultiModeCRT1Connect        = 4,                            /* 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe */
  137.     kMultiModeCRT2Connect        = 5,                            /* 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe */
  138.     kMultiModeCRT3Connect        = 6,                            /* 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain */
  139.     kMultiModeCRT4Connect        = 7,                            /* Expansion to large multi mode (not yet used) */
  140.     kModelessConnect            = 8,                            /* Expansion to modeless model (not yet used) */
  141.     kFullPageConnect            = 9,                            /* 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) */
  142.     kVGAConnect                    = 10,                            /* 640x480 VGA default -- question everything else */
  143.     kNTSCConnect                = 11,                            /* NTSC ST (default), FF, STconv, FFconv */
  144.     kPALConnect                    = 12,                            /* PAL ST (default), FF, STconv, FFconv */
  145.     kHRConnect                    = 13,                            /* 640x400 (to get 8bpp in 256K case) and 640x480 (these two only) */
  146.     kPanelFSTNConnect            = 14                            /* For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels */
  147. };
  148.  
  149. /* csTimingFlags values in VDTimingInfoRec */
  150. enum {
  151.     kModeValid                    = 0,                            /* Says that this mode should NOT be trimmed. */
  152.     kModeSafe                    = 1,                            /* This mode does not need confirmation */
  153.     kModeDefault                = 2,                            /* This is the default mode for this type of connection */
  154.     kModeShowNow                = 3,                            /* This mode should always be shown (even though it may require a confirm) */
  155.     kModeNotResize                = 4,                            /* This mode should not be used to resize the display (eg. mode selects a different connector on card) */
  156.     kModeRequiresPan            = 5                                /* This mode has more pixels than are actually displayed */
  157. };
  158.  
  159. enum {
  160. /* Control Codes */
  161.     cscReset                    = 0,
  162.     cscKillIO                    = 1,
  163.     cscSetMode                    = 2,
  164.     cscSetEntries                = 3,
  165.     cscSetGamma                    = 4,
  166.     cscGrayPage                    = 5,
  167.     cscGrayScreen                = 5,
  168.     cscSetGray                    = 6,
  169.     cscSetInterrupt                = 7,
  170.     cscDirectSetEntries            = 8,
  171.     cscSetDefaultMode            = 9,
  172.     cscSwitchMode                = 10,
  173.     cscSetSync                    = 11,
  174.     cscSavePreferredConfiguration = 16,
  175.     cscSetHardwareCursor        = 22,
  176.     cscDrawHardwareCursor        = 23,
  177.     cscSetConvolution            = 24,
  178.     cscUnusedCall                = 127                            /* This call used to expend the scrn resource.  Its imbedded data contains more control info */
  179. };
  180.  
  181. enum {
  182. /* Status Codes */
  183.     cscGetMode                    = 2,
  184.     cscGetEntries                = 3,
  185.     cscGetPageCnt                = 4,
  186.     cscGetPages                    = 4,                            /* This is what C&D 2 calls it. */
  187.     cscGetPageBase                = 5,
  188.     cscGetBaseAddr                = 5,                            /* This is what C&D 2 calls it. */
  189.     cscGetGray                    = 6,
  190.     cscGetInterrupt                = 7,
  191.     cscGetGamma                    = 8,
  192.     cscGetDefaultMode            = 9,
  193.     cscGetCurMode                = 10,
  194.     cscGetSync                    = 11,
  195.     cscGetConnection            = 12,                            /* Return information about the connection to the display */
  196.     cscGetModeTiming            = 13,                            /* Return timing info for a mode */
  197.     cscGetModeBaseAddress        = 14,                            /* Return base address information about a particular mode */
  198.     cscGetScanProc                = 15,                            /* QuickTime scan chasing routine */
  199.     cscGetPreferredConfiguration = 16,
  200.     cscGetNextResolution        = 17,
  201.     cscGetVideoParameters        = 18,
  202.     cscGetGammaList                = 19,                            /* Obsolete */
  203.     cscGetGammaInfoList            = 20,
  204.     cscRetrieveGammaTable        = 21,
  205.     cscSupportsHardwareCursor    = 22,
  206.     cscGetConvolution            = 24
  207. };
  208.  
  209. /* Bit definitions for the Get/Set Sync call*/
  210. enum {
  211.     kDisableHorizontalSyncBit    = 0,
  212.     kDisableVerticalSyncBit        = 1,
  213.     kDisableCompositeSyncBit    = 2,
  214.     kEnableSyncOnBlue            = 3,
  215.     kEnableSyncOnGreen            = 4,
  216.     kEnableSyncOnRed            = 5,
  217.     kNoSeparateSyncControlBit    = 6,
  218.     kHorizontalSyncMask            = 0x01,
  219.     kVerticalSyncMask            = 0x02,
  220.     kCompositeSyncMask            = 0x04,
  221.     kDPMSSyncMask                = 0x7,
  222.     kSyncOnBlueMask                = 0x08,
  223.     kSyncOnGreenMask            = 0x10,
  224.     kSyncOnRedMask                = 0x20,
  225.     kSyncOnMask                    = 0x38
  226. };
  227.  
  228. enum {
  229. /*    Power Mode constants for translating DPMS modes to Get/SetSync calls.    */
  230.     kDPMSSyncOn                    = 0,
  231.     kDPMSSyncStandby            = 1,
  232.     kDPMSSyncSuspend            = 2,
  233.     kDPMSSyncOff                = 7
  234. };
  235.  
  236. /* Bit definitions for the Get/Set Convolution call*/
  237. enum {
  238.     kConvolved                    = 0,
  239.     kLiveVideoPassThru            = 1,
  240.     kConvolvedMask                = 0x01,
  241.     kLiveVideoPassThruMask        = 0x02
  242. };
  243.  
  244. struct VPBlock {
  245.     long                            vpBaseOffset;                /*Offset to page zero of video RAM (From minorBaseOS).*/
  246.     short                            vpRowBytes;                    /*Width of each row of video memory.*/
  247.     Rect                            vpBounds;                    /*BoundsRect for the video display (gives dimensions).*/
  248.     short                            vpVersion;                    /*PixelMap version number.*/
  249.     short                            vpPackType;
  250.     long                            vpPackSize;
  251.     long                            vpHRes;                        /*Horizontal resolution of the device (pixels per inch).*/
  252.     long                            vpVRes;                        /*Vertical resolution of the device (pixels per inch).*/
  253.     short                            vpPixelType;                /*Defines the pixel type.*/
  254.     short                            vpPixelSize;                /*Number of bits in pixel.*/
  255.     short                            vpCmpCount;                    /*Number of components in pixel.*/
  256.     short                            vpCmpSize;                    /*Number of bits per component*/
  257.     long                            vpPlaneBytes;                /*Offset from one plane to the next.*/
  258. };
  259. typedef struct VPBlock VPBlock;
  260.  
  261. typedef VPBlock *VPBlockPtr;
  262.  
  263. struct VDEntryRecord {
  264.     Ptr                                csTable;                    /*(long) pointer to color table entry=value, r,g,b:INTEGER*/
  265. };
  266. typedef struct VDEntryRecord VDEntryRecord;
  267.  
  268. typedef VDEntryRecord *VDEntRecPtr;
  269.  
  270. /* Parm block for SetGray control call */
  271. struct VDGrayRecord {
  272.     Boolean                            csMode;                        /*Same as GDDevType value (0=mono, 1=color)*/
  273.     SInt8                            filler;
  274. };
  275. typedef struct VDGrayRecord VDGrayRecord;
  276.  
  277. typedef VDGrayRecord *VDGrayPtr;
  278.  
  279. /* Parm block for SetEntries control call */
  280. struct VDSetEntryRecord {
  281.     ColorSpec                        *csTable;                    /*Pointer to an array of color specs*/
  282.     short                            csStart;                    /*Which spec in array to start with, or -1*/
  283.     short                            csCount;                    /*Number of color spec entries to set*/
  284. };
  285. typedef struct VDSetEntryRecord VDSetEntryRecord;
  286.  
  287. typedef VDSetEntryRecord *VDSetEntryPtr;
  288.  
  289. /* Parm block for SetGamma control call */
  290. struct VDGammaRecord {
  291.     Ptr                                csGTable;                    /*pointer to gamma table*/
  292. };
  293. typedef struct VDGammaRecord VDGammaRecord;
  294.  
  295. typedef VDGammaRecord *VDGamRecPtr;
  296.  
  297. struct VDBaseAddressInfoRec {
  298.     long                            csDevData;                    /* LONGINT - (long) timing mode */
  299.     long                            csDevBase;                    /* LONGINT - (long) base address of the mode */
  300.     short                            csModeReserved;                /* INTEGER - (short) will some day be the depth */
  301.     long                            csModeBase;                    /* LONGINT - (long) reserved */
  302. };
  303. typedef struct VDBaseAddressInfoRec VDBaseAddressInfoRec, *VDBaseAddressInfoPtr;
  304.  
  305. struct VDSwitchInfoRec {
  306.     unsigned short                    csMode;                        /*(word) mode depth*/
  307.     unsigned long                    csData;                        /*(long) functional sResource of mode*/
  308.     unsigned short                    csPage;                        /*(word) page to switch in*/
  309.     Ptr                                csBaseAddr;                    /*(long) base address of page (return value)*/
  310.     unsigned long                    csReserved;                    /*(long) Reserved (set to 0) */
  311. };
  312. typedef struct VDSwitchInfoRec VDSwitchInfoRec;
  313.  
  314. typedef VDSwitchInfoRec *VDSwitchInfoPtr;
  315.  
  316. struct VDTimingInfoRec {
  317.     unsigned long                    csTimingMode;                /* LONGINT - (long) timing mode (a la InitGDevice) */
  318.     unsigned long                    csTimingReserved;            /* LONGINT - (long) reserved */
  319.     unsigned long                    csTimingFormat;                /* LONGINT - (long) what format is the timing info */
  320.     unsigned long                    csTimingData;                /* LONGINT - (long) data supplied by driver */
  321.     unsigned long                    csTimingFlags;                /* LONGINT - (long) mode within device */
  322. };
  323. typedef struct VDTimingInfoRec VDTimingInfoRec;
  324.  
  325. typedef VDTimingInfoRec *VDTimingInfoPtr;
  326.  
  327. struct VDDisplayConnectInfoRec {
  328.     unsigned short                    csDisplayType;                /* INTEGER - (word) Type of display connected */
  329.     unsigned char                    csConnectTaggedType;        /* BYTE - type of tagging */
  330.     unsigned char                    csConnectTaggedData;        /* BYTE - tagging data */
  331.     unsigned long                    csConnectFlags;                /* LONGINT - (long) tell us about the connection */
  332.     unsigned long                    csDisplayComponent;            /* LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) */
  333.     unsigned long                    csConnectReserved;            /* LONGINT - (long) reserved */
  334. };
  335. typedef struct VDDisplayConnectInfoRec VDDisplayConnectInfoRec;
  336.  
  337. typedef VDDisplayConnectInfoRec *VDDisplayConnectInfoPtr;
  338.  
  339. /* RawSenseCode
  340.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  341.     for the possible raw sense code values when 'standard' sense code hardware is implemented.
  342.  
  343.     For 'standard' sense code hardware, the raw sense is obtained as follows:
  344.         • Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  345.         • Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  346.  
  347.     IMPORTANT Note: 
  348.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  349.     are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  350.  
  351. */
  352. typedef unsigned char RawSenseCode;
  353.  
  354.  
  355. enum {
  356.     kRSCZero                    = 0,
  357.     kRSCOne                        = 1,
  358.     kRSCTwo                        = 2,
  359.     kRSCThree                    = 3,
  360.     kRSCFour                    = 4,
  361.     kRSCFive                    = 5,
  362.     kRSCSix                        = 6,
  363.     kRSCSeven                    = 7
  364. };
  365.  
  366. /* ExtendedSenseCode
  367.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  368.     for the values which are possible when the extended sense algorithm is applied to hardware
  369.     which implements 'standard' sense code hardware.
  370.  
  371.      For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  372.     (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  373.         • Drive sense line 'A' low and read the values of 'B' and 'C'.  
  374.         • Drive sense line 'B' low and read the values of 'A' and 'C'.
  375.         • Drive sense line 'C' low and read the values of 'A' and 'B'.
  376.  
  377.     In this way, a six-bit number of the form BC/AC/AB is generated. 
  378.  
  379.     IMPORTANT Note: 
  380.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  381.     are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  382.  
  383. */
  384. typedef unsigned char ExtendedSenseCode;
  385.  
  386.  
  387. enum {
  388.     kESCZero21Inch                = 0x00,                            /* 21" RGB                                 */
  389.     kESCOnePortraitMono            = 0x14,                            /* Portrait Monochrome                     */
  390.     kESCTwo12Inch                = 0x21,                            /* 12" RGB                                */
  391.     kESCThree21InchRadius        = 0x31,                            /* 21" RGB (Radius)                        */
  392.     kESCThree21InchMonoRadius    = 0x34,                            /* 21" Monochrome (Radius)                 */
  393.     kESCThree21InchMono            = 0x35,                            /* 21" Monochrome                        */
  394.     kESCFourNTSC                = 0x0A,                            /* NTSC                                 */
  395.     kESCFivePortrait            = 0x1E,                            /* Portrait RGB                         */
  396.     kESCSixMSB1                    = 0x03,                            /* MultiScan Band-1 (12" thru 1Six")    */
  397.     kESCSixMSB2                    = 0x0B,                            /* MultiScan Band-2 (13" thru 19")        */
  398.     kESCSixMSB3                    = 0x23,                            /* MultiScan Band-3 (13" thru 21")        */
  399.     kESCSixStandard                = 0x2B,                            /* 13"/14" RGB or 12" Monochrome        */
  400.     kESCSevenPAL                = 0x00,                            /* PAL                                    */
  401.     kESCSevenNTSC                = 0x14,                            /* NTSC                                 */
  402.     kESCSevenVGA                = 0x17,                            /* VGA                                     */
  403.     kESCSeven16Inch                = 0x2D,                            /* 16" RGB (GoldFish)                      */
  404.     kESCSevenPALAlternate        = 0x30,                            /* PAL (Alternate)                         */
  405.     kESCSeven19Inch                = 0x3A,                            /* Third-Party 19”                        */
  406.     kESCSevenNoDisplay            = 0x3F                            /* No display connected                 */
  407. };
  408.  
  409. struct VDPageInfo {
  410.     short                            csMode;                        /*(word) mode within device*/
  411.     long                            csData;                        /*(long) data supplied by driver*/
  412.     short                            csPage;                        /*(word) page to switch in*/
  413.     Ptr                                csBaseAddr;                    /*(long) base address of page*/
  414. };
  415. typedef struct VDPageInfo VDPageInfo;
  416.  
  417. typedef VDPageInfo *VDPgInfoPtr;
  418.  
  419. struct VDSizeInfo {
  420.     short                            csHSize;                    /*(word) desired/returned h size*/
  421.     short                            csHPos;                        /*(word) desired/returned h position*/
  422.     short                            csVSize;                    /*(word) desired/returned v size*/
  423.     short                            csVPos;                        /*(word) desired/returned v position*/
  424. };
  425. typedef struct VDSizeInfo VDSizeInfo;
  426.  
  427. typedef VDSizeInfo *VDSzInfoPtr;
  428.  
  429. struct VDSettings {
  430.     short                            csParamCnt;                    /*(word) number of params*/
  431.     short                            csBrightMax;                /*(word) max brightness*/
  432.     short                            csBrightDef;                /*(word) default brightness*/
  433.     short                            csBrightVal;                /*(word) current brightness*/
  434.     short                            csCntrstMax;                /*(word) max contrast*/
  435.     short                            csCntrstDef;                /*(word) default contrast*/
  436.     short                            csCntrstVal;                /*(word) current contrast*/
  437.     short                            csTintMax;                    /*(word) max tint*/
  438.     short                            csTintDef;                    /*(word) default tint*/
  439.     short                            csTintVal;                    /*(word) current tint*/
  440.     short                            csHueMax;                    /*(word) max hue*/
  441.     short                            csHueDef;                    /*(word) default hue*/
  442.     short                            csHueVal;                    /*(word) current hue*/
  443.     short                            csHorizDef;                    /*(word) default horizontal*/
  444.     short                            csHorizVal;                    /*(word) current horizontal*/
  445.     short                            csHorizMax;                    /*(word) max horizontal*/
  446.     short                            csVertDef;                    /*(word) default vertical*/
  447.     short                            csVertVal;                    /*(word) current vertical*/
  448.     short                            csVertMax;                    /*(word) max vertical*/
  449. };
  450. typedef struct VDSettings VDSettings;
  451.  
  452. typedef VDSettings *VDSettingsPtr;
  453.  
  454. typedef unsigned long DisplayModeID;
  455.  
  456. typedef unsigned long VideoDeviceType;
  457.  
  458. typedef unsigned long GammaTableID;
  459.  
  460. /* DepthMode
  461.     This abstract data type is used to to reference RELATIVE pixel depths.
  462.     Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  463.  
  464.     Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  465.     graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  466.     hardware, 'kDepthMode1' may represent 8BPP.
  467.  
  468.     DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  469.     behave as expected.  The values of the constants which comprise the set are such
  470.     that 'kDepthMode4 < kDepthMode6' behaves as expected.
  471. */
  472. typedef unsigned short DepthMode;
  473.  
  474.  
  475. enum {
  476.     kDepthMode1                    = 128,
  477.     kDepthMode2                    = 129,
  478.     kDepthMode3                    = 130,
  479.     kDepthMode4                    = 131,
  480.     kDepthMode5                    = 132,
  481.     kDepthMode6                    = 133
  482. };
  483.  
  484. enum {
  485.     kFirstDepthMode                = 128,                            /* These constants are obsolete, and just included    */
  486.     kSecondDepthMode            = 129,                            /* for clients that have converted to the above        */
  487.     kThirdDepthMode                = 130,                            /* kDepthModeXXX constants.                            */
  488.     kFourthDepthMode            = 131,
  489.     kFifthDepthMode                = 132,
  490.     kSixthDepthMode                = 133
  491. };
  492.  
  493. struct VDResolutionInfoRec {
  494.     DisplayModeID                    csPreviousDisplayModeID;    /* ID of the previous resolution in a chain */
  495.     DisplayModeID                    csDisplayModeID;            /* ID of the next resolution */
  496.     unsigned long                    csHorizontalPixels;            /* # of pixels in a horizontal line */
  497.     unsigned long                    csVerticalLines;            /* # of lines in a screen */
  498.     Fixed                            csRefreshRate;                /* Vertical Refresh Rate in Hz */
  499.     DepthMode                        csMaxDepthMode;                /* 0x80-based number representing max bit depth */
  500.     unsigned long                    csReserved;                    /* Reserved */
  501.     unsigned long                    csReserved1;                /* Reserved */
  502. };
  503. typedef struct VDResolutionInfoRec VDResolutionInfoRec;
  504.  
  505. typedef VDResolutionInfoRec *VDResolutionInfoPtr;
  506.  
  507. struct VDVideoParametersInfoRec {
  508.     DisplayModeID                    csDisplayModeID;            /* the ID of the resolution we want info on */
  509.     DepthMode                        csDepthMode;                /* The bit depth we want the info on (0x80 based) */
  510.     VPBlockPtr                        csVPBlockPtr;                /* Pointer to a video parameter block */
  511.     unsigned long                    csPageCount;                /* Number of pages supported by the resolution */
  512.     VideoDeviceType                    csDeviceType;                /* Device Type:  Direct, Fixed or CLUT; */
  513.     unsigned long                    csReserved;                    /* Reserved */
  514. };
  515. typedef struct VDVideoParametersInfoRec VDVideoParametersInfoRec;
  516.  
  517. typedef VDVideoParametersInfoRec *VDVideoParametersInfoPtr;
  518.  
  519. struct VDGammaInfoRec {
  520.     GammaTableID                    csLastGammaID;                /* the ID of the previous gamma table */
  521.     GammaTableID                    csNextGammaID;                /* the ID of the next gamma table */
  522.     Ptr                                csGammaPtr;                    /* Ptr to a gamma table data */
  523.     unsigned long                    csReserved;                    /* Reserved */
  524. };
  525. typedef struct VDGammaInfoRec VDGammaInfoRec;
  526.  
  527. typedef VDGammaInfoRec *VDGammaInfoPtr;
  528.  
  529. struct VDGetGammaListRec {
  530.     GammaTableID                    csPreviousGammaTableID;        /* ID of the previous gamma table */
  531.     GammaTableID                    csGammaTableID;                /* ID of the gamma table following csPreviousDisplayModeID */
  532.     unsigned long                    csGammaTableSize;            /* Size of the gamma table in bytes */
  533.     char                            *csGammaTableName;            /* Gamma table name (c-string) */
  534. };
  535. typedef struct VDGetGammaListRec VDGetGammaListRec;
  536.  
  537. typedef VDGetGammaListRec *VDGetGammaListPtr;
  538.  
  539. struct VDRetrieveGammaRec {
  540.     GammaTableID                    csGammaTableID;                /* ID of gamma table to retrieve */
  541.     GammaTbl                        *csGammaTablePtr;            /* Location to copy desired gamma to */
  542. };
  543. typedef struct VDRetrieveGammaRec VDRetrieveGammaRec;
  544.  
  545. typedef VDRetrieveGammaRec *VDRetrieveGammaPtr;
  546.  
  547. struct VDSetHardwareCursorRec {
  548.     void                            *csCursorRef;
  549. };
  550. typedef struct VDSetHardwareCursorRec VDSetHardwareCursorRec;
  551.  
  552. typedef VDSetHardwareCursorRec *VDSetHardwareCursorPtr;
  553.  
  554. struct VDDrawHardwareCursorRec {
  555.     long                            csCursorX;
  556.     long                            csCursorY;
  557.     long                            csCursorVisible;
  558. };
  559. typedef struct VDDrawHardwareCursorRec VDDrawHardwareCursorRec;
  560.  
  561. typedef VDDrawHardwareCursorRec *VDDrawHardwareCursorPtr;
  562.  
  563. struct VDSupportsHardwareCursorRec {
  564.     Boolean                            csSupportsHardwareCursor;    /* True if hardware cursor is supported */
  565.     SInt8                            filler;
  566. };
  567. typedef struct VDSupportsHardwareCursorRec VDSupportsHardwareCursorRec;
  568.  
  569. typedef VDSupportsHardwareCursorRec *VDSupportsHardwareCursorPtr;
  570.  
  571. struct VDDefMode {
  572.     UInt8                            csID;
  573.     SInt8                            filler;
  574. };
  575. typedef struct VDDefMode VDDefMode;
  576.  
  577. typedef VDDefMode *VDDefModePtr;
  578.  
  579. struct VDSyncInfoRec {
  580.     UInt8                            csMode;
  581.     UInt8                            csFlags;
  582. };
  583. typedef struct VDSyncInfoRec VDSyncInfoRec;
  584.  
  585. typedef VDSyncInfoRec *VDSyncInfoPtr;
  586.  
  587. struct VDConvolutionInfoRec {
  588.     DisplayModeID                    csDisplayModeID;            /* the ID of the resolution we want info on */
  589.     DepthMode                        csDepthMode;                /* The bit depth we want the info on (0x80 based) */
  590.     unsigned long                    csPage;
  591.     UInt32                            csFlags;
  592.     UInt32                            csReserved;
  593. };
  594. typedef struct VDConvolutionInfoRec VDConvolutionInfoRec;
  595.  
  596. typedef VDConvolutionInfoRec *VDConvolutionInfoPtr;
  597.  
  598.  
  599. #if PRAGMA_IMPORT_SUPPORTED
  600. #pragma import off
  601. #endif
  602.  
  603. #if PRAGMA_ALIGN_SUPPORTED
  604. #pragma options align=reset
  605. #endif
  606.  
  607. #ifdef __cplusplus
  608. }
  609. #endif
  610.  
  611. #endif /* __VIDEO__ */
  612.